<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>用户登录</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
    <link rel="stylesheet" th:href="@{/css/login.css}">
</head>
<body>
<div class="login-container">
    <div class="login-header">
        <i class="login-icon fas fa-user-circle"></i>
        <h2>用户登录</h2>
        <p class="text-muted">欢迎回到云学堂</p>
    </div>
    <form id="formSub" method="post">
        <div class="form-group">
            <label for="username" class="form-label">用户名</label>
            <div class="input-group">
                <span class="input-group-text"><i class="fas fa-user"></i></span>
                <input type="text" id="username" name="username" class="form-control" required placeholder="请输入用户名">
            </div>
            <span id="userResult"></span>
        </div>

        <div class="form-group">
            <label for="password" class="form-label">密码</label>
            <div class="input-group">
                <span class="input-group-text"><i class="fas fa-lock"></i></span>
                <input type="password" id="password" name="password" class="form-control" required placeholder="请输入密码">
            </div>
        </div>

        <div class="form-group">
            <label class="form-label">验证码</label>
            <div class="code-group">
                <div class="input-group">
                    <span class="input-group-text"><i class="fas fa-key"></i></span>
                    <input type="text" name="code" class="form-control" placeholder="请输入验证码">
                </div>
                <input type="button" id="code" value="获取验证码">
            </div>
        </div>

        <button type="submit" class="btn btn-login">登录</button>
    </form>
    <div class="footer">
        <p>© 2023 云学堂 | 让知识触手可及</p>
    </div>
</div>
</body>
<script th:src="@{/js/login.js}"></script>
</html>